package com.dbz.service.Impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dbz.dao.CustomerOrderDao;
import com.dbz.entity.CustomerOrder;
import com.dbz.service.CustomerOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CustomerOrderServiceImpl implements CustomerOrderService {
    @Resource
    private CustomerOrderDao customerOrderDao;

    /**
     * 分页查询
     * @param page
     * @param queryMapper
     * @return
     */
    @Override
    public IPage<CustomerOrder> selectPage(IPage<CustomerOrder> page, Wrapper<CustomerOrder> queryMapper) {
        return customerOrderDao.selectPage(page, queryMapper);
    }

    /**
     * 删除销售订单信息
     * @param cid
     * @return
     */
    @Override
    public int delecteCustomerOrder(String cid) {
        return customerOrderDao.delecteCustomerOrder(cid);
    }

    /**
     * 添加销售订单信息
     * @param customerOrder
     * @return
     */
    @Override
    public int insertCustomerOrder(CustomerOrder customerOrder) {
        return customerOrderDao.insertCustomerOrder(customerOrder);
    }
}
